﻿@{
    ViewBag.Title = Local("ThreadView.PageTitle");
    ViewBag.ActionMenu = "threadsview";
}
@model Thread

@using (Html.BeginForm())
{
<div class="box">
    <label>@GLocal("Thread.Title")</label>
    <div class="right winput">
        @Html.TextBoxFor(model => model.Title)
    </div>
</div>
    
<div class="box">
    <label>@GLocal("Thread.Key")</label>
    <div class="right winput">
        @Html.TextBoxFor(model => model.Key)
        <div class="summary">@GLocal("Thread.Key.Summary")</div>
    </div>
</div>
    
<div class="box">
    <label>@GLocal("Thread.CategoryID")</label>
    <div class="right">
        @Html.DropdownListCategoryFor(model=>model.CategoryID, ApplicationType.Common)
    </div>
</div>
    
<div class="box">
    <label>@GLocal("Thread.IsApproved")</label>
    <div class="right">
        @Html.CheckBoxFor(model => model.IsApproved)
    </div>
</div>
    
<div class="box">
    <label>@GLocal("Thread.AllowedApply")</label>
    <div class="right">
        @Html.CheckBoxFor(model => model.AllowedApply)
    </div>
</div>
    
<div class="box">
    <label>@GLocal("Thread.AllowedAnonymousApply")</label>
    <div class="right">
        @Html.CheckBoxFor(model => model.AllowedAnonymousApply)
    </div>
</div>
    
<div class="box">
    <label>@GLocal("Thread.IsStrict")</label>
    <div class="right">
        @Html.CheckBoxFor(model => model.IsStrict)
    </div>
</div>

<div class="box">
    <label>@GLocal("Thread.Tags")</label>
    <div class="right winput">
        @Html.TextBoxFor(model => model.Tags)
        <div class="summary">@GLocal("Thread.Tags.Summary")</div>
    </div>
</div>
    
<div class="box">
    <label>@GLocal("Thread.Summary")</label>
    @Html.TextAreaFor(model => model.Summary)
</div>
    
<div class="box">
    <label>@GLocal("Thread.LogoUrl")</label>
    <div class="right winput">
        @Html.TextBoxFor(model => model.LogoUrl, new { @readonly = "readonly" })
        <div style="margin-top:10px;">
            <img src="@Model.LogoUrl" alt="@GLocal("Thread.ClickSelectedIcon")" title="@GLocal("Thread.ClickSelectedIcon")" id="logo" onclick="return openModal('@CUrls.DialogDiskUrl?type=8', 650);" style="width:@(Application.Current.Configuration.CategoryWidth)px; height:@(Application.Current.Configuration.CategoryHeight)px;" />
        </div>
    </div>
</div>
    
<div class="box">
    <label>@GLocal("Thread.Body")</label>
    @Html.TextAreaFor(model => model.Body, new { id = "Editor" })
</div>
    
<div class="box">
    <button> @GLocal("Thread.Save") </button>
</div>
<script type="text/javascript">
    function callback(id) {
        var url = '@GetFileBrowserUrl()' + id;
        $('#logo').attr('src', url);
        $('#LogoUrl').val(url);
    }
</script>
}

@section header
{
    @Html.AddKindEditor("#Editor")
}